package com.tankGame;

import javax.swing.*;

/**
 * @author LingLed
 * @version 1.0
 * 游戏窗口
 */
public class GameFrame extends JFrame {
    MyPanel mp = null;
    public static void main(String[] args) {
        new GameFrame();
    }
    public GameFrame(){
        mp = new MyPanel();

        this.add(mp);
        this.addKeyListener(mp);
        //设置窗口标题
        this.setTitle("坦克大战");
        //简单初始化
        this.setSize(MyPanel.WIDTH+18,MyPanel.HEIGHT+47);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
    }
}

